package com.study.design.decorator;

/**
 * 装饰类
 */
public class Decorator extends Componet {
    private Componet componet = null;

    /**
     * 通过构造函数传递被修饰者
     *
     * @param componet
     */
    public Decorator(Componet componet) {
        this.componet = componet;
    }

    /**
     * 委托给被修者执行
     */
    @Override
    public void operate() {
        this.componet.operate();
    }
}
